
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myLanguageLabel" data-translate="gatewayApp.language.home.createOrEditLabel">Create or edit a Language</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.language.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.language.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.language.name" for="field_name">Name</label>
            <input type="text" class="form-control" name="name" id="field_name"
                    ng-model="vm.language.name"
                    />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.language.key" for="field_key">Key</label>
            <input type="text" class="form-control" name="key" id="field_key"
                    ng-model="vm.language.key"
                    required ng-maxlength="8"/>
            <div ng-show="editForm.key.$invalid">
                <p class="help-block"
                    ng-show="editForm.key.$error.required" data-translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.key.$error.maxlength" data-translate="entity.validation.maxlength" translate-value-max="8">
                    This field cannot be longer than 8 characters.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.language.description" for="field_description">Description</label>
            <input type="text" class="form-control" name="description" id="field_description"
                    ng-model="vm.language.description"
                    />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.language.enabled" for="field_enabled">Enabled</label>
                <input type="checkbox" name="enabled" id="field_enabled"
                          ng-model="vm.language.enabled"/>
            <div ng-show="editForm.enabled.$invalid">
                <p class="help-block"
                    ng-show="editForm.enabled.$error.required" data-translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.language.displayOrder" for="field_displayOrder">Display Order</label>
            <input type="number" class="form-control" name="displayOrder" id="field_displayOrder"
                    ng-model="vm.language.displayOrder"
                    />
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
